home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
tchk.arc
/
TCHKDEMO.C
< prev
next >
Wrap
Text File
|
1990-08-09
|
2KB
|
75 lines
#include <howard.h>
#include <menuhk.h>
#include <video.h>
#include <color.h>
#include <keyboard.h>
#include <keycode.h>
#include <stringhk.h>
#include <datehk.h>
#include <timehk.h>
#include <ibm.h>
#include <filehk.h>
#include <alloc.h>
#include <string.h>
#include <stdio.h>
#include <dos.h>
void goodbye(void);
main()
{
char key=0, cmdkey[9], keystr[20];
byte *cmd[9] = { "Video", "Keyboard", "String",
"Time", "Date", "IBM",
"File", "Menu", "Quit" };
byte *msg[9] = { "Screen routines", "Keyboard routines",
"String manipulations", "Time functions",
"Date functions", "IBM machine specific functions",
"File functions", "Menu functions",
"Quit this demo" };
byte cmdcol[9], msglen[9];
int i;
cls();
set_color(BROWN|B_BLACK);
gotoxy(0,5);
putstr("This is a sample of TCHK's slash bar menu function");
lotus_setup(9,cmd,cmdkey,cmdcol,msg,msglen);
key = menu_lotus(9,cmdkey,cmd,cmdcol,msg,msglen,LCYAN,LWHITE|B_RED,2,TRUE,0,72,LGREEN);
set_color(BROWN);
putsay(6,0,"You selected ");
for (i=0; i<9; i++)
if (key == cmdkey[i]) {
strcpy(keystr,cmd[i]);
break;
}
set_color(LRED);
putsay(6,13,keystr);
goodbye();
}
void goodbye(void)
{
extern byte frame2[9];
set_color(BLACK|B_BLUE);
box(8,7,21,50,frame2);
set_color(LCYAN);
putsay(10,10,"This is but a small sample of TCHK");
putsay(12,10,"If you like this library, you can");
set_color(LRED|BLINK);
putsay(13,10,"REGISTER");
set_color(LCYAN);
putsay(13,19,"for the measly sum of ");
set_color(LRED|BLINK);
putsay(13,41,"$15");
set_color(LCYAN);
putsay(13,44,".");
putsay(15,10,"Registered users get all size memory");
putsay(16,10,"models instead of just the small model");
putsay(17,10,"distributed publicly.");
putsay(19,10,"Check out TCHK.DOC for more information");
}